Repository navigation
Array pack with format J and j specs - #320
Conversation
|
I'm putting these specs out there as I need guidance regarding the use of standard libraries, and a custom guard (pointer_size_is). |
|
It would be better to not require Fiddle (stdlib) in core specs if we can avoid it. There is already a similar guard: |
|
There is currently an issue with mingw32-compiled ruby on Windows 64-bit, where technically the platform is 64-bit but it behaves much more similar to a 32-bit one due to the compiler toolchain. I need to figure that one out, but you should not need to worry about this special case here. |
|
Another way I thought of finding pointer width was I'll remove Fiddle dependency and use wordsize guard. Thanks! |
in Array pack with format J and j specs
to pack array with format J
|
I added mingw32 guards as per l_spec. Thanks for the heads-up! |
|
|
||
| platform_is_not :mingw32 do | ||
|
|
||
| describe "Array#pack with modifier '_'" do |
There was a problem hiding this comment.
Could you nest the describe calls like in https://github.com/ruby/spec/blob/master/core/array/pack/l_spec.rb#L23-L24 ?
So the full description for those specs still mention 'J' 😄
| require File.expand_path('../shared/integer', __FILE__) | ||
|
|
||
| ruby_version_is '2.3' do | ||
|
|
There was a problem hiding this comment.
Could you remove the extra vertical space when there is already an indentation change?
Yes indeed, it would only test that it's consistent with itself. |
| end | ||
|
|
||
| describe "Array#pack with format 'j'" do | ||
| describe "Array#pack with modifier '_'" do |
There was a problem hiding this comment.
One last thing: the Array#pack here is redundant.
You can have a look at the final description with mspec -fs path/to/spec.rb
|
That's perfect, thanks a lot for the new spec and the fixes! 👍 🎉 |
Add specs for Array pack j and J directives for pointer width integer type.
Issue Ruby 2.3 specs #175 - Feature #11215